<?php
class Application_Model_Comments extends Application_Model_Db_Db
{
	public function getContentComments($contentId) {
		$sql = "SELECT
					`user`.`social_id`,
					`comment`.`id`,
					`comment`.`text`,
					`comment`.`date`
				FROM `comment`
				INNER JOIN `user`
				    ON `comment`.`author_id` = `user`.`id`
				WHERE `comment`.`content_id` = ?
				ORDER BY `comment`.`date` DESC";
	    return $this->_db->fetchAll($sql, $contentId);
	}
}